package com.sevenmall.productservice.mapper;

import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.sevenmall.productservice.pojo.Product;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import org.apache.ibatis.annotations.Param;
import org.springframework.stereotype.Repository;

import java.util.List;

/**
 * <p>
 * 商品表 Mapper 接口
 * </p>
 *
 * @author Yesi
 * @since 2020-08-24
 */
@Repository
public interface ProductMapper extends BaseMapper<Product> {
    int insert(Product product);

    int deleteById(int id);

    Product findById(int id);

    List<Product> findByWrapper(QueryWrapper queryWrapper);

    Long countByWrapper(QueryWrapper queryWrapper);

    int updateByWrapper(Product product, QueryWrapper queryWrapper);
}
